package com.zhangtai.modules.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhangtai.modules.entity.employee.EmployeeOverworkEntity;
import com.zhangtai.modules.entity.employee.SubEmployeeOverworkEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 *
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-12-07 15:29:22
 */
@Mapper
public interface SubEmployeeOverworkDao extends BaseMapper<SubEmployeeOverworkEntity> {

    @Select("<script>SELECT " +
            " id " +
            " FROM " +
            " tb_sub_employee_overwork t1 " +
            "<where>  t1.is_delete = 0   " +
            "<if test='employeeId!=null and employeeId!=&apos;&apos;'>and t1.teo_id = #{employeeId} </if>" +
            "</where>" +
            "</script>")
    List<Long> getSubOverWorkList(@Param(value = "employeeId") String employeeId );

    @Select("<script>SELECT " +
            " * "  +
            "FROM " +
            " tb_sub_employee_overwork t1 " +
            "<where>  t1.is_delete = 0   " +
            "<if test='teoId!=null and teoId!=&apos;&apos;'>and t1.teo_id = #{teoId} </if>" +
            "</where>" +
            "</script>")
    List<SubEmployeeOverworkEntity> getSubOverWorkListVo(@Param(value = "teoId") String teoId );


}